#ifndef RSSTHREAD_H
#define RSSTHREAD_H

#include <QThread>
#include <QObject>
#include <QNetworkReply>

#include "updateworker.h"
#include "rssfeed.h"


class UpdateThread : public QThread {
		Q_OBJECT

	private:
		bool isReady;

	public:
		UpdateThread(QObject *parent = 0);
		void updateAsync(const QList<RssFeed*> &feedRequests, int timeout) {
			emit updateRequested(feedRequests, timeout);
		}

	signals:
		void updateRequested(const QList<RssFeed*> &feedRequests, int timeout);
		void updateFinished();
		void progress(int, const QString &);

	protected:
		void run();

};


#endif // RSSTHREAD_H
